package cn.woblog.android.common.utils;

import android.os.Handler;

/**
 * Created by ren on 2015/6/1 0001.
 */
public class TimeUtils {
    private static long beginTime;

    public static void beginTime() {
        beginTime = System.currentTimeMillis();
    }
    public static long endTime() {
      return System.currentTimeMillis() - beginTime;
    }


    public static  interface OnDelayedSuccess{
        void onDelayedSuccess(int flag);
    }
    public static void delayed(long secound, final OnDelayedSuccess listener, final int flag) {
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                listener.onDelayedSuccess(flag);
            }
        },secound);
    }
}
